package com.kingmed.kmss.framework.feign.client.bpmn;


import com.kingmed.kmss.common.bo.bpmn.GroupBO;
import com.kingmed.kmss.common.bo.bpmn.UserBO;
import com.kingmed.kmss.common.bo.bpmn.UserGroupBO;
import com.kingmed.kmss.common.vo.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * 审批模块Bpmn
 */
@FeignClient(name = "RemoteBpmnGroupService", url = "${internalService.bpmnService.url}", fallback = RemoteBpmnGroupFallbackService.class)
public interface RemoteBpmnGroupService {

    @PostMapping(value = "/bpmn/ext/group")
    CommonResponse<?> createGroup(@RequestBody GroupBO groupBO);

    @PostMapping(value = "/bpmn/ext/group/delete")
    CommonResponse<?> deleteGroup(@RequestBody GroupBO groupBO);

    @PostMapping(value = "/bpmn/ext/group/assignUser")
    CommonResponse<?> assignUserToGroups(@RequestBody UserBO userBo);

    @PostMapping(value = "/bpmn/ext/group/unAssignUser")
    CommonResponse<?> unassignUserFromGroups(@RequestBody UserGroupBO userGroupBo);
}
